<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>爱的告白</title>
    <style>
        /* 心跳动画关键帧  */
        @keyframes heartbeat {
            0% { transform: scale(1); }
            25% { transform: scale(1.1); }
            50% { transform: scale(0.95); }
            75% { transform: scale(1.05); }
            100% { transform: scale(1); }
        }

        body {
            background: #ffe6e6;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 100vh;
            margin: 0;
            font-family: 'Microsoft YaHei', sans-serif;
        }

        .heart {
            width: 120px;
            height: 120px;
            position: relative;
            animation: heartbeat 1.2s ease-in-out infinite;
            cursor: pointer;
        }

        /* CSS3绘制心形  */
        .heart::before,
        .heart::after {
            content: '';
            position: absolute;
            width: 70px;
            height: 110px;
            background: #ff3366;
            border-radius: 70px 70px 0 0;
            box-shadow: 0 4px 15px rgba(255,51,102,0.3);
        }

        .heart::before {
            left: 70px;
            transform: rotate(-45deg);
            transform-origin: 0 100%;
        }

        .heart::after {
            left: 0;
            transform: rotate(45deg);
            transform-origin: 100% 100%;
        }

        .text {
            margin-top: 30px;
            color: #ff3366;
            font-size: 24px;
            text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
            opacity: 0;
            transition: opacity 0.5s;
        }

        /* 点击交互效果  */
        .heart:active {
            animation: none;
            transform: scale(0.9);
        }

        .show-text { opacity: 1; }
    </style>
</head>
<body>
    <div class="heart" onclick="toggleText()"></div>
    <div class="text" id="loveText">宝宝我爱你</div>

    <script>
        function toggleText() {
            const text = document.getElementById('loveText');
            text.classList.toggle('show-text');
            
            // 添加微信分享功能（需配置微信JS-SDK）
            /* 正式环境需替换为微信公众平台的appId和签名 */
            wx.config({
                debug: false,
                appId: 'your-wechat-appid',
                timestamp: new Date().getTime(),
                nonceStr: '随机字符串',
                signature: '签名信息',
                jsApiList: ['updateAppMessageShareData']
            });
        }
    </script>
</body>
</html>